<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

<style>
    .box div{
        width: 100px;
        height: 100px;
        border: 2px solid black;
    }
    .box div:last-child{
        background :red;
    }
    .box div:first-child{
        background: yellow;
    }
    .box div:nth-child(2n+1){
        background: blue;
    }
    div{
        border: 1px solid red;
    }
    div p:only-child{
        background-color: yellow;
    }
    div:empty{
            width: 100px;
            height: 100px;
            background:yellow;
        }
</style>
</head>
<body>
    <!-- <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
    </div> -->

    <div>
        <p>111</p>
        <p>222</p>
    </div>
    <div>
        <p>111</p>
    </div>

    <div></div>
</body>
</html>